home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Tech Arsenal 1
/
Tech Arsenal (Arsenal Computer).ISO
/
tek-01
/
cuj1008.zip
/
1008012B
< prev
next >
Wrap
Text File
|
1992-06-12
|
339b
|
19 lines
Listing 2 -- atexit.c
/* atexit function */
#include <stdlib.h>
/* external declarations */
extern void (*_Atfuns[])(void);
extern size_t _Atcount;
int (atexit)(void (*func)(void))
{ /* function to call at exit */
if (_Atcount == 0)
return (-1); /* list is full */
_Atfuns[--_Atcount] = func;
return (0);
}